<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>配置信息列表-编辑配置信息</title>
<link href="/majiang/Public/admin/css/style.css" rel="stylesheet" type="text/css" />
<script language="JavaScript" src="/majiang/Public/admin/js/jquery.js"></script>

<link href="/majiang/Public/validform/Validform.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="/majiang/Public/validform/Validform_v5.3.2.js"></script>
<script type="text/javascript" src="/majiang/Public/validform/Validform_Datatype.js"></script>

<script type="text/javascript" src="/majiang/Public/layer/layer.js"></script>
<script>
//弹出腾讯地图
function showmap(){
	layer.open({
		type: 2,
		title: '电子围栏设置',
		maxmin: false,
		shadeClose: true, //点击遮罩关闭层
		area : ['800px' , '520px'],
		content: '<?php echo U("public/elecfence");?>'
	});
}
</script>
</head>

<body>

	<div class="place">
		<span>位置：</span>
		<ul class="placeul">
			<li><a href="<?php echo U('index/welcome');?>">首页</a></li>
			<li><a href="<?php echo U('setting/index');?>">配置信息列表</a></li>
			<li><a href="#">编辑配置信息</a></li>
		</ul>
    </div>
    
    <div class="formbody">
    
		<div class="formtitle"><span>编辑配置信息</span></div>

		<form name="myform" id="myform" action="<?php echo U('setting/editsetting',array('set_id'=>$settinginfo['set_id']));?>" method="post">
			<ul class="forminfo">
				<li><label>配置KEY</label><input name="username" id="username" type="text" class="dfinput" readonly value="<?php echo ($settinginfo["set_key"]); ?>" /></li>
				<li>
					<label>配置VLAUE</label><input name="info[set_value]" id="set_value" type="text" class="dfinput" value="<?php echo ($settinginfo["set_value"]); ?>" datatype="*" errormsg="配置VLAUE不能为空！" /><i class="Validform_checktip"></i>
					<?php if($settinginfo["set_key"] == 'elecfence' ): ?><!--如果是电子围栏-显示选择地图-->
						<a onclick="showmap();" class="tablelink" style="cursor:pointer;">地图</a><?php endif; ?>
				</li>
				<li><label>配置说明</label><input name="info[set_remarks]" id="set_remarks" type="text" class="dfinput" value="<?php echo ($settinginfo["set_remarks"]); ?>" datatype="*" errormsg="配置说明不能为空！" maxlength="20" /><i class="Validform_checktip"></i></li>

				<li><label>&nbsp;</label><input name="btn" type="submit" class="btn" value="确认保存"/></li>
			</ul>
		</form>
    
    </div>

	<script>
	$(function(){
		$("#myform").Validform({
			//tiptype:2
			tiptype:function(msg,o,cssctl){
				var objtip=o.obj.siblings(".Validform_checktip");
				cssctl(objtip,o.type);
				objtip.text(msg);
			}
		});
	}); 
	</script>
</body>

</html>